/*******************************************************************************
* Project: QSAR(Cute Software Architecture)
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: CanIfCfg.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: CanIf
*
* Generation Time: 2025-02-04 15:31:15
*
*******************************************************************************/

/** HEADER FILES **/
#include "CanIfCfg.h"


/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/
const CanIf_TxPduCfgType Canif_TxPduCfg[CanIfConf_CanIfTxPduCfg_Pdu_Max];

const CanIfTxPduCfgType CanIfTxPduCfg[CanIfConf_CanIfTxPduCfg_Pdu_Max];
const CanIfRxPduCfgType CanIfRxPduCfg[CanIfConf_CanIfRxPduCfg_Pdu_Max];

/** LOCAL DATA **/
const CanIfCtrlCfgType CanIfCtrlCfg[CanIfConf_CtrlDrv_Max] = 
{
    /* CanCtrlRef,   CtrlId,  WakeupSupport  */
    {NULL_PTR,       0u,      SET }
};


const CanIfCtrlDrvCfgType CanIfCtrlDrvCfg[CanIfConf_CtrlDrv_Max] = 
{
    /* CtrlDrv_0 */
    {
        /* CanCtrlRef,  CtrlId,               WakeupSupport */
        {NULL_PTR,      CanIfConf_CtrlDrv_0,  RESET }
    }
};

const CanIfHthCfgType CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Max] = 
{
    /* CanIfHthCanCtrlIdRef, CanIfHthIdSymRef, CanObjectId */
    {NULL_PTR,               NULL_PTR,         0},
    {NULL_PTR,               NULL_PTR,         0},
    {NULL_PTR,               NULL_PTR,         0},
    {NULL_PTR,               NULL_PTR,         0},
    {NULL_PTR,               NULL_PTR,         0},
    {NULL_PTR,               NULL_PTR,         0},
    {NULL_PTR,               NULL_PTR,         0},
};

const CanIfHrhCfgType CanIfHrhCfg[CanIfConf_CtrlDrv_Max] = 
{
    /* CanCtrlId,                                                HrhIdSymRef,   SoftwareFilter,  RangeCfg  */
    {(CanIfCtrlCfgType*)&CanIfCtrlCfg[CanIfConf_CtrlDrv_0],    NULL_PTR,      SET,               {0x500, 0x5FF}}
};

const CanIfBufferCfgType CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Max] = 
{
    /* CanIfBufferHthRef,                                                          BufferSize */
    {(CanIfHthCfgType*)&CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can4],   8u},
    {(CanIfHthCfgType*)&CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can3],   8u},
    {(CanIfHthCfgType*)&CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_NM],   8u},
    {(CanIfHthCfgType*)&CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Xcp],   8u},
    {(CanIfHthCfgType*)&CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_DiagPhysResponse],   8u},
    {(CanIfHthCfgType*)&CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can2],   8u},
    {(CanIfHthCfgType*)&CanIfHthCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can1],   8u},
};

const CanIfTxPduCfgType CanIfTxPduCfg[CanIfConf_CanIfTxPduCfg_Pdu_Max] = 
{
    /* CanIfTxPduUserTxConfirmationName       CanIdType,                       TxPduId,                                   CanId,  Upper layer,            BufferRef,                                                     TxPduRef */
    {PduR_CanIfTxConfirmation, CANIF_TX_PDU_TYPE_STANDARD_CAN,  CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can4,  260, CANIF_TX_PDU_UL_CAN_TP, (CanIfBufferCfgType*)&CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can4],   (PduType*)&Pdu[ComStackConf_PduId_Tx_Channel1_Qsar_Qsar_Can4]},
    {PduR_CanIfTxConfirmation, CANIF_TX_PDU_TYPE_STANDARD_CAN,  CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can3,  259, CANIF_TX_PDU_UL_CAN_TP, (CanIfBufferCfgType*)&CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can3],   (PduType*)&Pdu[ComStackConf_PduId_Tx_Channel1_Qsar_Qsar_Can3]},
    {NULL_PTR, CANIF_TX_PDU_TYPE_STANDARD_CAN,  CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_NM,  1280, CANIF_TX_PDU_UL_CAN_TP, (CanIfBufferCfgType*)&CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_NM],   (PduType*)&Pdu[ComStackConf_PduId_Tx_Channel1_Qsar_Qsar_NM]},
    {NULL_PTR, CANIF_TX_PDU_TYPE_STANDARD_CAN,  CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Xcp,  768, CANIF_TX_PDU_UL_CAN_TP, (CanIfBufferCfgType*)&CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Xcp],   (PduType*)&Pdu[ComStackConf_PduId_Tx_Channel1_Qsar_Qsar_Xcp]},
    {NULL_PTR, CANIF_TX_PDU_TYPE_STANDARD_CAN,  CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_DiagPhysResponse,  1824, CANIF_TX_PDU_UL_CAN_TP, (CanIfBufferCfgType*)&CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_DiagPhysResponse],   (PduType*)&Pdu[ComStackConf_PduId_Tx_Channel1_Qsar_DiagPhysResponse]},
    {PduR_CanIfTxConfirmation, CANIF_TX_PDU_TYPE_STANDARD_CAN,  CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can2,  258, CANIF_TX_PDU_UL_CAN_TP, (CanIfBufferCfgType*)&CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can2],   (PduType*)&Pdu[ComStackConf_PduId_Tx_Channel1_Qsar_Qsar_Can2]},
    {PduR_CanIfTxConfirmation, CANIF_TX_PDU_TYPE_STANDARD_CAN,  CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can1,  257, CANIF_TX_PDU_UL_CAN_TP, (CanIfBufferCfgType*)&CanIfBufferCfg[CanIfConf_CanIfTxPduCfg_Pdu_Channel1_Qsar_Qsar_Can1],   (PduType*)&Pdu[ComStackConf_PduId_Tx_Channel1_Qsar_Qsar_Can1]},
};

const CanIfRxPduCfgType CanIfRxPduCfg[CanIfConf_CanIfRxPduCfg_Pdu_Max] = 
{
    /* CanIfRxPduUserRxIndicationName,       RxPduHrhIdRef                                              PduID,                                    CanId,                Length,   Upper layer              RxPduRef */
    {PduR_CanIfRxIndication,  (CanIfHrhCfgType*)&CanIfHrhCfg[CanIfConf_CtrlDrv_0],    CanIfConf_CanIfRxPduCfg_Pdu_Channel1_Other_Other_Can3, 515,     8u,      CANIF_RX_PDU_UL_PDUR,   (PduType*)&Pdu[ComStackConf_PduId_Rx_Channel1_Other_Other_Can3]},
    {CanNm_RxIndication,  (CanIfHrhCfgType*)&CanIfHrhCfg[CanIfConf_CtrlDrv_0],    CanIfConf_CanIfRxPduCfg_Pdu_NM, CANID_INVALID_VALUE,     8u,      CANIF_RX_PDU_UL_PDUR,   (PduType*)&Pdu[ComStackConf_PduId_Rx_NM]},
    {Xcp_CanIfRxIndication,  (CanIfHrhCfgType*)&CanIfHrhCfg[CanIfConf_CtrlDrv_0],    CanIfConf_CanIfRxPduCfg_Pdu_Tester_Xcp, 512,     8u,      CANIF_RX_PDU_UL_PDUR,   (PduType*)&Pdu[ComStackConf_PduId_Rx_Tester_Xcp]},
    {CanTp_RxIndication,  (CanIfHrhCfgType*)&CanIfHrhCfg[CanIfConf_CtrlDrv_0],    CanIfConf_CanIfRxPduCfg_Pdu_Channel1_Tester_DiagFuncRequest, 2015,     8u,      CANIF_RX_PDU_UL_PDUR,   (PduType*)&Pdu[ComStackConf_PduId_Rx_Channel1_Tester_DiagFuncRequest]},
    {CanTp_RxIndication,  (CanIfHrhCfgType*)&CanIfHrhCfg[CanIfConf_CtrlDrv_0],    CanIfConf_CanIfRxPduCfg_Pdu_Channel1_Tester_DiagPhysRequest, 1808,     8u,      CANIF_RX_PDU_UL_PDUR,   (PduType*)&Pdu[ComStackConf_PduId_Rx_Channel1_Tester_DiagPhysRequest]},
    {PduR_CanIfRxIndication,  (CanIfHrhCfgType*)&CanIfHrhCfg[CanIfConf_CtrlDrv_0],    CanIfConf_CanIfRxPduCfg_Pdu_Channel1_Other_Other_Can2, 514,     8u,      CANIF_RX_PDU_UL_PDUR,   (PduType*)&Pdu[ComStackConf_PduId_Rx_Channel1_Other_Other_Can2]},
    {PduR_CanIfRxIndication,  (CanIfHrhCfgType*)&CanIfHrhCfg[CanIfConf_CtrlDrv_0],    CanIfConf_CanIfRxPduCfg_Pdu_Channel1_Other_Other_Can1, 513,     8u,      CANIF_RX_PDU_UL_PDUR,   (PduType*)&Pdu[ComStackConf_PduId_Rx_Channel1_Other_Other_Can1]},
};
